{{define "notice"}}
<div class="box" id="notice" style="display: none">
    <article class="media">
        <div class="media-content">
            <div class="content">
                <div class="page-card-title">
                    公告
                </div>
                <div class="page-card-text" style="padding-bottom: 16px">
                    {{.option.Notice | unescape}}
                </div>
                <button class="button is-success is-outlined" style="float: right"
                        onclick="document.getElementById('notice').style.display='none'">好的
                </button>
            </div>
        </div>
    </article>
</div>
<script>
    (async function () {
        let notice = "{{.option.Notice}}";
        if (notice.trim() !== "" && localStorage.getItem("notice") !== notice) {
            localStorage.setItem("notice", notice);
            document.getElementById('notice').style.display = 'block';
        }
    })();
</script>
{{end}}